package com.services;

import com.DAO.AdminRepository;
import com.DAO.StaffRepository;
import com.DAO.impl.AdminRepositoryImpl;
import com.DAO.impl.StaffRepositoryImpl;

public class LoginService{

    private StaffRepository staffRepository = new StaffRepositoryImpl();
    private AdminRepository adminRepository = new AdminRepositoryImpl();

    public Object login(String username, String password,String type) {
        Object object = null;
        switch (type){
            case "staff":
                object = staffRepository.login(username,password);
                break;
            case "admin":
                object = adminRepository.login(username, password);
                break;
        }
        return object;
    }
}
